package edu.fdzc.springboot01.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import edu.fdzc.springboot01.entity.Department;
import edu.fdzc.springboot01.mapper.DepartmentMapper;
import edu.fdzc.springboot01.service.DepartmentService;
import edu.fdzc.springboot01.vo.DeptVo;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Department> implements DepartmentService {

    @Override
    public DeptVo getByIdWithUsers(Integer id) {
        return baseMapper.selectDeptWithUsers(id);
    }

    @Override
    public List<DeptVo> getAllDeptsWithUsers() {
        return baseMapper.selectAllDeptsWithUsers();
    }
}